]> dgit.raspbian.org Git - gnome-shell.git/commit
extensions: Add static defineTranslationFunctions() method
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 10 Jul 2023 05:06:17 +0000 (07:06 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 30 Jul 2023 07:29:44 +0000 (10:29 +0300)
commitf59d5236948ed593fd4cfc13b58a039733e1e7c5
tree91fc6cb1213be79eea0a63db9e31b8d35d456ab5
parentcd99fbae50b7d08a1ce93440d7a93f57cb098155
extensions: Add static defineTranslationFunctions() method

The method can be used to define a set of gettext functions that
call the corresponding method of an extension.

Those functions are very similar to the gettext functions we are
exporting, except that:

 - looking up the extension is delegated to the
   Extension/Preferences class
 - it is possible to avoid examining the stack
   when called with `import.meta.url`

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2838>
js/extensions/extension.js
js/extensions/prefs.js
js/extensions/sharedInternals.js